MWPW-193548: Carry locale tax label through mas-field & Copy Field preview#820
Open
antonio-rmrz wants to merge 3 commits intomainfrom
Open
MWPW-193548: Carry locale tax label through mas-field & Copy Field preview#820antonio-rmrz wants to merge 3 commits intomainfrom
antonio-rmrz wants to merge 3 commits intomainfrom
Conversation
…nd Copy Field preview Two coordinated changes so prices rendered through `<mas-field>` (the headless Copy Field flow used on da-cc pages) carry the same locale-default labels as merch-card-hosted prices, and so the Copy Field popover preview mirrors what the user sees. - web-components/src/mas-field.js: register a price options provider that flips FF_DEFAULTS on for inline-prices whose nearest ancestor is `<mas-field>`, mirroring merch-card.js. Without this, headless fr_FR renders skipped DISPLAY_ALL_TAX_COUNTRIES resolution and lost the "TTC" tax label. - studio/src/mas-side-nav.js: drop the `wantsExtras` heuristic that was checking `data-display-tax`/`data-display-per-unit` on the source span. Tax/per-unit labels are locale-driven and already reflected in the rendered preview DOM, so prefer formattedText (rendered output) and fall back to coreText only if labels were absent.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #820 +/- ##
==========================================
+ Coverage 87.45% 87.48% +0.03%
==========================================
Files 214 214
Lines 63827 63848 +21
==========================================
+ Hits 55821 55860 +39
+ Misses 8006 7988 -18
... and 4 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Regression test for the popover-preview half of the fix: opens the Jira
reproducer fragment in fr_FR, asserts the rendered card preview carries
a non-disabled `.price-tax-inclusivity` ("TTC"), opens the Copy Field
side-nav popover, and asserts the Prices row preview contains the same
label. Locks in the mas-side-nav.js change.
studio.page.js gets four new locators for the Copy Field flow
(side-nav button + open popover + row-by-label helper + row-value
helper), scoped via `this.sideNav` so Playwright pierces the side-nav
shadow root cleanly.
Blainegunn
approved these changes
May 1, 2026
Wrap the registerPriceOptionsProvider guard so it stays under the project line-length cap. No behavior change.
Axelcureno
approved these changes
May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves https://jira.corp.adobe.com/browse/MWPW-193548
Description
data-display-tax="true"was authored on the source span; tax/per-unit are actually locale-resolved at render time (FR_fr is inDISPLAY_ALL_TAX_COUNTRIES).web-components/src/mas-field.js: register a price options provider that flipsFF_DEFAULTSfor inline-prices nested under<mas-field>— mirrorsmerch-card.js, scoped per-element.studio/src/mas-side-nav.js: drop thewantsExtrasheuristic in#resolveInlinePricesInHtml; the rendered preview DOM already reflects locale resolution, so useformattedText.mas-field.test.js, 1 popover regression inmas-side-nav.test.js. Full web-components suite green (1276 / 0 / 2 skipped).Test URLs —
Studio:
Premiere Site: